home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 18
/
CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso
/
CUCD
/
Magazine
/
WiredWorld
/
THOR_2.5_upgrade
/
rexx
/
examples
/
CountFiles.br
< prev
next >
Wrap
Text File
|
1997-09-15
|
890b
|
51 lines
/* $VER: CountFiles.br 1.0 (5.9.97)
*
* Count the files in a file database..
*/
parse arg argument
if(argument = '') then
do
say '$VER: CountFiles.br V3.1 (27.01.95)'
say 'Template: BBSNAME/A'
exit
end
if ~show('p', 'BBSREAD') then do
address command
"run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
"WaitForPort BBSREAD"
end
address BBSREAD
GETFAREALIST stem FAREALIST argument
if(rc ~= 0) then
do
say BBSREAD.LASTERROR
exit
end
files = 0
say 'Available file areas:'
do i=1 to FAREALIST.COUNT
GETFAREADATA fareaname FAREALIST.i stem FAREADATA argument
if(rc ~= 0) then
do
say BBSREAD.LASTERROR
exit
end
say ' ' || left(FAREALIST.i,20) || right(FAREADATA.NUMFILES, 6)
files = files + FAREADATA.NUMFILES
end
say left("",21) || "------"
say right("Sum: ", 21) || right(files, 6)
say left("",21) || "======"
exit